 {layout name="common/layout" /}
 <style>
  .table tr td:nth-of-type(1){
		 white-space: nowrap;
 }
 .table tr td:nth-of-type(2){
		 white-space: nowrap;
 }
 .table tr td:nth-of-type(3){
		 white-space: nowrap;
 }
 .table tr td:nth-of-type(4){
		 white-space: nowrap;
 }
  .table tr td:nth-of-type(5){
		 white-space: nowrap;
  }
  .table tr td:nth-of-type(6){
	  white-space: nowrap;
  }
  .table tr td:nth-of-type(7){
	white-space: nowrap;
  }
  .table tr td:nth-of-type(8){
	white-space: nowrap;
  }
  .table tr td:nth-of-type(9){
	white-space: nowrap;
  }
  .table tr td:nth-of-type(10){
	white-space: nowrap;
  }
  .table tr td:nth-of-type(11){
	white-space: nowrap;
  }
  .table tr td:nth-of-type(12){
	white-space: nowrap;
  }
  .table tr td:nth-of-type(13){
	  white-space: nowrap;
  }
  .table tr td:nth-of-type(14){
	  white-space: nowrap;
  }
  .table tr:nth-of-type(odd){
	  background: #f6f6f6;
  }
 </style>
<div class="Hui-article-box" style="margin-top: 37px;">
		<div class="newCrumbs" style="font-size:30px;">结算账单
				
			</div>
	<div class="Hui-article" style="margin-bottom: 200px;">
		<div class="">
			<h3 style="font-size:20px;">日期：{$year}年{$may}月份</h3>
			<div class="account">
				<span style="font-size:20px;">总计:</span>
			    <span style="font-size:18px;">租金:</span>
			    <span style="margin-left: -10px;font-size:18px;margin-right:15px;">￥{$result['rent_money']|sprintf ="%.2f",###}</span>
				<span style="font-size:18px;">运费:</span>
				<span style="margin-left: -10px;font-size:18px;margin-right:15px;">￥{$result['freight_money']|sprintf ="%.2f",###}</span>
				<span style="font-size:18px;">违约金:</span>
				<span style="margin-left: -10px;font-size:18px;margin-right:15px;">￥{$result['liquidated_money']|sprintf ="%.2f",###}</span>
				<span style="font-size:18px;">损坏赔偿金:</span>
				<span style="margin-left: -10px;font-size:18px;margin-right:15px;">￥{$result['damages_money']|sprintf ="%.2f",###}</span>
				<span style="font-size:18px;">结算金额:</span>
				<span style="margin-left: -10px;font-size:18px;margin-right:15px;">￥{$result['total_money']|sprintf ="%.2f",###}</span>
				<span style="font-size:18px; color:#ff0000">提醒:前期佣金优惠50%</span>
			</div>
		<div style="float: right;">
			<a class="btn" onclick="toExcel()" style="background: #43c9eb;margin-top: 0px">导出</a></div>
		</div>

		 <table class="table table-border table-bg  table-bordered" style="margin-top: 10px;">
					 <tr class="text-c first-tr" style="background-color: #e8e8e8;">
						 <td >订单号</td>
						 <td >商品名称</td>
						 <td >订单状态</td>
						 <td >租金</td>
						 <td >运费</td>
						 <td >违约金</td>
						 <td >损坏赔偿金</td>
						 <td >佣金</td>
						 <td >合计</td>
					 </tr>
                     {foreach($data as $k=>$v)}
					 <tr class="text-c">
						  <td><a style="color: #2196f3" href="{:url('details')}?id={$v['order_id']}">{$v['order_sn']}</a></td>
						  <td>{$v['goods_name']}</td>
						  <td>{if condition="$v['order_status'] eq 0"}
							 退款订单
							 {elseif condition="$v['order_status'] eq 1"}
							 成功订单
							 {elseif condition="$v['order_status'] eq 2"}
							 待结算
							 {elseif condition="$v['order_status'] eq 3"}
							 退货订单
							 {else/}

							 {/if}
						 </td>
						  <td>{$v['rent_money']|sprintf ="%.2f",###}</td>
						  <td>{$v['freight_money']|sprintf ="%.2f",###}</td>
						  <td>{$v['liquidated_money']|sprintf ="%.2f",###}</td>
						  <td>{$v['damages_money']|sprintf ="%.2f",###}</td>
                          <td>{$v['commission']|sprintf ="%.2f",###}</td>
                          <td>{$v['total_money']|sprintf ="%.2f",###}</td>
                    {/foreach}
                    </table>
		<div class="dataTables_info f-l" id="DataTables_Table_0_info" role="status" aria-	live="polite" style="margin-top: 15px;">每页 {$pagesizes?$pagesizes : 30}条 ，共 {$data->total()} 条</div>
						{$data->render()}
		</div>				
</div>
	
 
<script>
	$(function(){
	$.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click","0")});
	var GG = {
        "kk":function(mm){
           var ym=mm;
        }
    }
	$("#paginate").initPage(71,1,GG.kk);
	 
</script>
 <script>
	function toExcel()
	{
		location.href="billToExcel?year="+{$year}+"&may="+{$may};
	}
</script>
